package com.itheima.reggie.mapper;

        import com.baomidou.mybatisplus.core.mapper.BaseMapper;
        import com.itheima.reggie.domain.Category;
        import org.springframework.stereotype.Repository;

        import java.util.List;

@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    //查询分类列表
    List<Category> findAll();

    //新增分类
    void save(Category category);

    //更新分类
    void update(Category category);

    //从菜品表统计当前分类下的菜品数量
    Integer countDishByCategoryId(long categoryId);

    //从套餐表统计当前分类下的套餐数量
    Integer countSetmealByCategoryId(Long categoryId);

    //删除
    void delete(Long id);
}
